-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Specify default security user provider. #1132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Specify default security user provider. #1132
Conversation
Thanks for this proposal Pol ... I don't know much about this (@wouterj knows everything about the new security system) but I think this proposal makes sense (I even think that Symfony made it "mandatory" a while ago ... or maybe it was a related change, I can't remember exactly). In any case, I like the overall idea ... and I like it even more because it solves your issue. But let's wait for more comments to see if there's some technical drawback. Thanks! |
Waiting for @wouterj 's feedback. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 The implicit default is nice for quick bootstrapping, but it makes more sense to explicitly specify the user providers for each authentication provider. The MakerBundle was also recently updated to always specify the user provider, so I think it makes sense to update the demo app as well.
I think it might make more sense to have this option as last in the list instead of first (the first ones are specific for the form_login).
Btw, I think you're talking about the entry_point
being mandatory in the new security system, Javier. However, the entry_point
DX when using the old system is quite bad - so we should not add it atm (demo is not using the new system yet).
Going to make the changes now. |
@javiereguiluz and @wouterj Ready for review again now. |
Do you think we can move this forward now @javiereguiluz ? |
It's barely 23 hours since the last comment on this PR. There is a lot more to do in the life of open source maintainers than merging PRs in one of the 10+ packages they maintain :) |
That is true as well :-) Didn't meant to push, sorry ✌️ |
And this is now merge 🎉 Thanks Pol for the contribution and thanks Wouter for the quick review! |
Merci, hope you don't feel offended by my previous message! |
Of course not!!! We usually merge things fast ... but these days I'm a bit busy with work-related stuff. But I completely understand the excitement to get some contribution merged fast (I feel the same all the time with my contributions 😊 ) |
Hello,
I published a Symfony bundle ecphp/cas-bundle, that bundle has a Symfony flex recipe.
When users are trying the bundle against the Symfony demo (
symfony new project --demo
), it fails during installation because the flex recipe copies configuration files from the bundle into the app config directory.Among the copied files, there is this one in particular, which contains a new security user provider.
The demo app has a firewall already configured to use the only existing provider: database_users.
When installing the demo app and the
ecphp/cas-bundle
bundle, it fails because multiple user providers exists in the application and the firewall do not know which one to use for theform_login
listener.My proposal is to explicitly specify which user provider to use for the
form_login
listener so we don't have this issue anymore with bundles providing their own security user provider.When modifying the
security.yaml
file before running thecomposer require ecphp/cas-bundle
, it works without any issue.Log